Use this migration guide to update Kanzi applications from Kanzi 3.3 to Kanzi 3.4.
Kanzi libraries are now available only for Visual Studio 2013 and 2015. To replace the Visual Studio 2010 configurations in your old projects with Visual Studio 2015 configurations:





MOD() binding functionWhen Kanzi Studio converts projects created in the previous version of Kanzi, it changes the MOD() functions in the bindings to the newly introduced REM() functions. This conversion preserves the calculation result.
In Kanzi 3.4 the REM() function returns the same value as the MOD() function returned in the earlier Kanzi versions, while the modified MOD() function introduced in Kanzi 3.4 now returns a different result. See Modulo and Remainder.
On the Windows operating system you can select whether you want to use ES or GL in the Application::onConfigure() function, in the application.cfg, or using the command line arguments, if your target supports command line arguments. Separate ES2_IMG configurations no longer exist.
In the application.cfg use:
GraphicsBackend to either of these values:GraphicsContextAPI to either of these values:In the Application::onConfigure() use:
configuration.defaultSurfaceProperties.type to either of these values:KZS_SURFACE_TYPE_ES2_ONLY (surface is target for OpenGLES 2.0 rendering)KZS_SURFACE_TYPE_GL_ONLY (surface is target for OpenGL rendering)configuration.defaultSurfaceProperties.contextApi to either of these values:KZS_GRAPHICS_CONTEXT_API_WGL (use WGL for graphics context)KZS_GRAPHICS_CONTEXT_API_EGL (use EGL for graphics context)On the command line use:
-gles to use ES-gl to use GL-egl to use EGL-wgl to use WGLSee Graphics library.
The include path for these Kanzi Engine includes related to graphics is now kanzi/graphics_backend:
For example, update the old path
#include <kanzi/graphics3d/texture.hpp>
to the new path
#include <kanzi/graphics_backend/texture.hpp>
Kanzi 3.4 streamlines the API for managing textures and render targets. The new API provides means to validate support for particular graphics hardware features and ensures that texture objects are fully constructed and always usable.
Texture class supports textures with image data and render target textures.
There are different specialized subclasses of the CreateInfo class which are included for your convenience:
CreateInfo2D
CreateInfoHostCopy2D
CreateInfoRenderTarget2D
CreateInfoCubemap
You can still modify the parameters of CreateInfo before passing them to the Texture::create() function.
To create a texture first use Texture::CreateInfo to prepare the structure and then pass it to the Texture constructor, or TextureSharedPtr Texture::create() function.
After you create a texture you cannot modify the texture parameters which you passed in the Texture::CreateInfo.
Texture creation now throws an exception if you pass wrong parameters or parameters not supported by the graphics device to the Texture::CreateInfo.
If you load a texture from a kzb file and the texture validation fails, Kanzi uses a default texture and writes a warning message to the log.
Framebuffer is a Kanzi Engine feature that supports complex configuration of OpenGL pipeline. It is used internally in RenderPass class to implement features like multiple render targets or rendering to a particular mipmap level. Use render passes in Kanzi Studio to configure complex OpenGL pipeline.
Blend Mode (StandardMaterial::BlendModeProperty) is no longer a property that you can add or remove in a shader.
Replaced setActiveSurface() with setActiveGraphicsOutput().
If you load a Kanzi 3.2 project, it may contain nodes (for example Image 2D) using materials with material types which do not use the Blend Mode property. To maintain the desired effect in materials, before loading the project in Kanzi 3.4 make the following changes in Kanzi 3.2:
2D and 3D nodes transformation properties are described by SRTValue2D and SRTValue3D structures. Matrix3x3 and Matrix4x4 structures are no longer used for this purpose. See SRTValue2D and SRTValue3D.
SRTValue3D stores rotation as a quaternion which allows creating of smoother rotations in animations, but can produce different results than when you use Euler angles.
If you created Page nodes in code, the Page node is split into classes Page and PageHost. You must create a Page Host node as the root node in any Page or Page Host hierarchy.
These properties are no longer in the Page class, but in the PageHost class:
These message types are no longer in the Page class, but in the PageHost class:
See the MessageArguments class.
If you use input manipulators in code, see the API documentation of the related input manipulator class.
Mesh::generateBox is now Mesh::createBox.
Mesh::generateSphere is now Mesh::createSphere.
Mesh::generatePlane is now Mesh::createPlane.
Declaring metadata for message types and property types has changed. You are required to use kzMakeFixedString macro to provide the name of the property or message type. See <KanziWorkspace>/Examples/Node2D_plugin and <KanziWorkspace>/Examples/Node3D_plugin examples.
This is the last version of Kanzi which contains the old C animation API. This means that some of the features of the old animation system are going to be removed in the next version of Kanzi. See Known issues.
Please provide feedback whether you want to continue using the features which were included in the old C API animation system, but are not included in the new C++ API animation system.